/* 
平台属性管理相关的接口请求函数
*/
import request from '@/utils/request'

export default {
  
  /* 
  获取指定3级分类下的属性列表
  GET /admin/product/attrInfoList/{category1Id}/{category2Id}/{category3Id}
  */
  getList(category1Id, category2Id, category3Id) {
    return request.get(`/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`)
  },

  /* 
  删除指定属性
  DELETE /admin/product/deleteAttr/{attrId}
  */
  remove (attrId) {
    return request.delete(`/admin/product/deleteAttr/${attrId}`)
  },

  /* 
  添加/更新平台属性
  POST /admin/product/saveAttrInfo
  */
  save (attr) {
    return request.post('/admin/product/saveAttrInfo', attr)
  }
}